package com.sun.spring5.config;

import com.sun.spring5.bean.Orders;
import com.sun.spring5.bean.Person;
import com.sun.spring5.beanProcessor.MyOrders;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

//配置类==配置文件
@Configuration
@EnableAspectJAutoProxy
@ComponentScan(value = {"com.sun.spring5.bean","com.sun.spring5.config"})
public class MainConfig {
    /*//给容器注册一个bean，类型为返回值的类型，id默认是方法名作为id
    @Bean(name = "person",initMethod = "init",destroyMethod = "destroy")
    public Person getPerson(){
        return new Person("张三",20);
    }*/



    /*@Bean
    public MyOrders myOrders(){
        return new MyOrders();
    }*/
}
